import request from '@/utils/request'
import qs from 'qs'

export function addHelp(id, title, orderBy, showStatus) {
    return request({
        url: '/api/help/addHelp.do',
        method: 'post',
        data: qs.stringify({
            id, title, orderBy, showStatus
        })
    })
}

export function listHelp(type) {
    return request({
        url: '/api/help/listHelp.do',
        method: 'get',
        params: { type }
    })
}

export function updateStatusHelp(id) {
    return request({
        url: '/api/help/updateStatusHelp.do',
        method: 'get',
        params: { id }
    })
}

export function deleteHelp(id) {
    return request({
        url: '/api/help/deleteHelp.do',
        method: 'get',
        params: { id }
    })
}


export function addHelpContent(id, helpId, content, orderBy, showStatus) {
    return request({
        url: '/api/help/addHelpContent.do',
        method: 'post',
        data: qs.stringify({
            id, helpId, content, orderBy, showStatus
        })
    })
}

export function listHelpContent(helpId,type) {
    return request({
        url: '/api/help/listHelpContent.do',
        method: 'get',
        params: { helpId,type }
    })
}

export function updateStatusHelpContent(id) {
    return request({
        url: '/api/help/updateStatusHelpContent.do',
        method: 'get',
        params: { id }
    })
}

export function deleteHelpContent(id) {
    return request({
        url: '/api/help/deleteHelpContent.do',
        method: 'get',
        params: { id }
    })
}